<template>
  <el-form>
    <el-alert
      :title="`共${total}条记录`"
      type="info"
      show-icon
      :closable="false"
      style="margin:20px 0"
    />
    <el-table
      :data="tableData"
      stripe
      style="width: 100%"
    >

      <el-table-column
        prop="id"
        label="编号"
        width="180"
      />
      <el-table-column
        prop="questionType"
        label="题型"
        width="100"
      />
      <el-table-column
        prop="tags"
        label="题目编号"
      />
      <el-table-column
        prop="addTime"
        label="录入时间"
      />
      <el-table-column
        prop="totalSeconds"
        label="答题时间(s)"
      />
      <el-table-column
        prop="accuracyRate"
        label="正确率(%)"
      />
      <el-table-column
        prop="userName"
        label="录入人"
      />
      <el-table-column label="操作">
        <template slot-scope="scope">

          <el-button
            type="danger"
            icon="el-icon-delete"
            circle
            @click="handleDelete(scope.row)"
          />
        </template>
      </el-table-column>
    </el-table>
  </el-form>
</template>

<script>
import { getListAPI } from '@/api/practice'
export default {
  name: 'List',
  data() {
    return {
      total: '',

      // 获取列表数据
      tableData: []

    }
  },
  created() {
    this.getList()
  },
  methods: {
    // 获取组题列表
    async getList() {
      const resp = await getListAPI(1, 10)
      console.log(resp)
    },
    handleDelete() {

    }

  }

}
</script>

<style>

</style>
